// Person.h
#include <iostream>
#include <string>
using namespace std;

class Person
{
public:
    Person() {}
    ~Person() {}
    void setName(const string &name) { cout << "Person::setName()" << endl; }
    string getName() const {}
    void setAge(int age) {}
    int getAge() const {}
protected:
    string name;
private:
    int age;
};

class Student : public Person
{
public:
    Student() {
        // 派生类不能访问基类中私有成员
        // age = 17;

        name = "xxx";
        setName("xxx");
    }
    ~Student() {}
    void setId(int id) {}
    int getId() const {}

    void setName() { cout << "Student::setName()" << endl; }
private:
    int id;
};

int main()
{
    Student stu;
    stu.setName("name");
    // 对象不能访问保护成员和私有成员
    // stu.name = "xxx";
    // stu.age = 17;
    return 0;
}